<style src="./update-invester-portfolio.css" scoped></style>
<template>
  <div class="model-wrap">
    <button class="btn btn-sm btn-primary"
      @click="showUpdateInvesterDialog">修改信息</button>
      <modal
        :title="'增加投顾组合'"
        ok-text="提交"
        cancel-text="取消"
        effect="fade"
        :small="true"
        :width="460"
        :show.sync="showUpdateInvesterModal"
        :callback="updateInvesterDetail">
        <div slot="modal-body" class="modal-body">
          <form class="form-horizontal" role="form" v-el:add-form>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">
                <span class="label-red">*</span>
                组合ID</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" disabled v-model="detail.id">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">
                <span class="label-red">*</span>
                组合名称</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" v-model="detail.name">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">
                <span class="label-red">*</span>
                组合描述</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" v-model="detail.descr">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">标签（用空格分开）</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" v-model="detail.labels">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">
                <span class="label-red">*</span>
                组合类型</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" v-model="detail.betaType">
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">
                <span class="label-red">*</span>
                产品介绍</label>
              <div class="col-sm-9 text-left">
                <textarea class="form-control" rows="3" v-model="detail.proDesc"></textarea>
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">适合人群</label>
              <div class="col-sm-9 text-left">
                <textarea class="form-control" rows="3" v-model="detail.proSpec"></textarea>
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">
                风险等级</label>
              <div class="col-sm-9 text-left">
                <input type="text" class="form-control" v-model="detail.riskLevel"
                  v-if="payType === 2">
    						<select class="form-control" v-model="detail.riskLevel"
                  v-if="payType === 1">
                  <option value="保守型">保守型</option>
                  <option value="稳健型">稳健型</option>
                  <option value="积极型">积极型</option>
                </select>
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">原组合封面</label>
              <div class="col-sm-9 text-left" v-if="detail.imgUrl">
                <img class="invester-image" :src="serverRoot + detail.imgUrl" />
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">
                组合封面</label>
              <div class="col-sm-9 text-left">
                <input type="file" class="form-control"
                  v-model="detail.file" accept="image/jpeg,image/png" v-el:group-image>
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">
                <span class="label-red">*</span>
                投顾人员ID</label>
              <div class="col-sm-9 text-left">
                <select class="form-control" v-model="detail.investerId">
                  <option
                    v-for="item in investerList">
                    {{item.id}}
                  </option>
                </select>
              </div>
            </div>
            <template v-if="currentInvester">
              <div class="form-group form-group-sm">
                <label class="col-sm-3 control-label">
                  <span class="label-red">*</span>
                  投顾人员姓名</label>
                <div class="col-sm-9 text-left">
                  <input type="text" class="form-control" disabled v-model="currentInvester.name">
                </div>
              </div>
              <div class="form-group form-group-sm">
                <label class="col-sm-3 control-label">投顾人员机构</label>
                <div class="col-sm-9 text-left">
                  <input type="text" class="form-control" disabled v-model="currentInvester.org">
                </div>
              </div>
              <div class="form-group form-group-sm">
                <label class="col-sm-3 control-label">
                  <span class="label-red">*</span>
                  投顾人员执业编号</label>
                <div class="col-sm-9 text-left">
                  <input type="text" class="form-control" disabled v-model="currentInvester.cardNum">
                </div>
              </div>
              <div class="form-group form-group-sm">
                <label class="col-sm-3 control-label">
                  <span class="label-red">*</span>
                  投顾人员头像</label>
                <div class="col-sm-9 text-left">
                  <img class="invester-image" :src="serverRoot + currentInvester.img"/>
                </div>
              </div>
            </template>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">NEW标识</label>
              <div class="col-sm-9 text-left">
                <select class="form-control" v-model="detail.isNew">
                  <option value="0">否</option>
                  <option value="1">是</option>
                </select>
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">展示在首页</label>
              <div class="col-sm-9 text-left">
                <select class="form-control" v-model="detail.isHomepage">
                  <option value="0">否</option>
                  <option value="1">是</option>
                </select>
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">允许一键买入</label>
              <div class="col-sm-9 text-left">
                <select class="form-control" v-model="detail.isBuyAllow">
                  <option value="0">否</option>
                  <option value="1">是</option>
                </select>
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">允许一键调仓</label>
              <div class="col-sm-9 text-left">
                <select class="form-control" v-model="detail.isTransferAllow">
                  <option value="0">否</option>
                  <option value="1">是</option>
                </select>
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">上架</label>
              <div class="col-sm-9 text-left">
                <select class="form-control" v-model="detail.status">
                  <option value="0">否</option>
                  <option value="1">是</option>
                </select>
              </div>
            </div>
            <div class="form-group form-group-sm">
              <label class="col-sm-3 control-label">展示合作方</label>
              <div class="col-sm-9 text-left">
                <select class="form-control" v-model="detail.isCoorp">
                  <option value="0">否</option>
                  <option value="1">是</option>
                </select>
              </div>
            </div>
          </form>
        </div>
      </modal>
  </div>
</template>
<script src="./update-invester-portfolio.js"></script>
